Repository navigation
feat(aio): support offline experiment scorers - #1313
Conversation
PR overviewNo security issues were found in this pull request. Reviews
|
SDK performance: posthog-pythonBenchmarks completed. No changes flagged for review. Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate. View all results
Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals. Each shard uses its own runner; compare Before PR against With PR within a row, not across shards. Compared 102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in |
There was a problem hiding this comment.
Not approved — this change needs a human reviewer.
Adding the stamphog label gives the same result unless the changed files change.
stamphog can't approve this pull request automatically. The deny-list gate refused it because the change touches references/public_api_snapshot.txt, which matches the public_api category. The tier gate then placed it in T2-never as a result. Size was not a factor: the substantive change is 297 lines across 5 files, within the ceiling.
The next step is to ask a human reviewer to look at it, since changes to the public API surface need a person's sign-off. Splitting the PR won't help, because any piece that updates the API snapshot would be refused the same way.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✗ | matches: public_api in references/public_api_snapshot.txt |
| every_file_attested | ✓ | not a bot PR |
| size | ✓ | 297L, 5F substantive, 515L/10F incl. docs/generated/snapshots — within ceiling |
| tier | ✗ | T2-never because the deny-list matched public_api |
| stamphog 2.9.1 | .stamphog/policy.yml @ unknown · reviewed head cd4c09f |
Motivation and context
Python callers can now pin an experiment scorer version when creating a run and manage experiment formulas and suite assignments through the sync and async scorer clients. Experiment formulas retain the statistic, version policy, and category when callers fetch and reuse them. Older item scorer responses remain readable.
The public API snapshot, offline evaluations example, and release changeset are updated. The server contract and shared acceptance scenarios are in PostHog/sdk-specs#256. The backend shipped in PostHog/posthog#142387.
How did you test it?
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Codex implemented and tested the SDK changes. Radu signed and pushed the verified commit.